#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
	int i, j;
	int mid;
	printf("mid = ");
	scanf("%d", &mid);
	for (i = 1; i <= mid + 1; i++)
	{
		for (j = 1; j <= 2*mid + 1; j++)
		{
			if (i == mid + 1|| j == mid + 1)
			{
				printf("*");
			}
			else if (j > mid + 1 - i && j <= mid + i)
			{
				printf("*");
			}
			else
				printf(" ");
		}
		printf("\n");
	}
	for (i = mid; i > 0; i--)
	{
		for (j = 2 * mid + 1; j > 0; j--)
		{
			if (i == mid + 1 || j == mid + 1)
			{
				printf("*");
			}
			else if (j > mid + 1 - i && j <= mid + i)
			{
				printf("*");
			}
			else
				printf(" ");
		}
		printf("\n");
	} 

	return 0;
}